package com.xique.door.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xique.door.bean.domain.BuildBuilding;
import com.xique.door.bean.domain.BuildBuildingV1;
import com.xique.door.bean.search.build.BuildingListSearch;

import java.util.List;
import java.util.Map;

/**
 * 楼栋Service接口
 *
 * @author shd
 * @date 2021-09-10
 */
public interface IBuildBuildingService extends IService<BuildBuildingV1>
{
    /**
     * 查询楼栋
     *
     * @param id 楼栋ID
     * @return 楼栋
     */
    public BuildBuilding selectBuildBuildingById(Long id);

    /**
     * 查询楼栋列表
     *
     * @param buildBuilding 楼栋
     * @return 楼栋集合
     */
    public List<BuildBuilding> selectBuildBuildingList(BuildBuilding buildBuilding);

    /**
     * 根据区域id查询楼栋列表
     *
     * @param ids 楼栋
     * @return 楼栋集合
     */
    List<BuildBuilding> selectBuildBuildingListByAreaIds(List<Long> ids);

    /**
     * 根据ids查询楼栋列表
     *
     * @param ids 楼栋
     * @return 楼栋集合
     */
    List<BuildBuilding> selectBuildBuildingListByIds(List<Long> ids);

    /**
     * 新增楼栋
     *
     * @param buildBuilding 楼栋
     * @return 结果
     */
    public int insertBuildBuilding(BuildBuilding buildBuilding);

    /**
     * 修改楼栋
     *
     * @param buildBuilding 楼栋
     * @return 结果
     */
    public int updateBuildBuilding(BuildBuilding buildBuilding);

    /**
     * 批量删除楼栋
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteBuildBuildingByIds(String ids);

    /**
     * 删除楼栋信息
     *
     * @param id 楼栋ID
     * @return 结果
     */
    public int deleteBuildBuildingById(Long id);

    /**
     * 根据id获取楼栋名称
     * @author shd
     * @date 2021/12/27 16:12
     * @param ids
     * @return java.util.Map<java.lang.Long,java.lang.String>
     */
    Map<Long, String> selectBuildingName(List<Long> ids);

    public int batchInsertBuildings(List<BuildBuilding> buildBuilding);

    /**
     * 查询楼栋列表（分页）
     * @author shd
     * @date 2022/3/8 14:31
     * @param search
     * @return java.util.List<com.xique.door.bean.domain.BuildBuilding>
     */
    IPage<BuildBuildingV1> selectBuildBuildingPageV1(BuildingListSearch search);

    /**
     * 查询楼栋列表
     * @author shd
     * @date 2022/3/29 13:19
     * @param search
     * @return java.util.List<com.xique.door.bean.domain.BuildBuildingV1>
     */
    List<BuildBuildingV1> selectBuildBuildingListV1(BuildingListSearch search);

    BuildBuildingV1 selectBuildBuildingV1(BuildBuildingV1 buildBuildingV1);
}
